#define  _CRT_SECURE_NO_WARNINGS
#include <stdio.h>

void move_odd_even(int* arr, int p)
{
	int left = 0;
	int right = p - 1;
	while(left < right)
	{
		while ((left < right) && (arr[left] % 2 == 1))
		{
			left++;
		}
		while ((left < right) && (arr[right] % 2 == 0))
		{
			right--;
		}
		if (left < right)
		{
			int temp = 0;
			temp = arr[left];
			arr[left] = arr[right];
			arr[right] = temp;
		}
	}
}

int main()
{
	int i = 0;
	int arr[10] = {0};
	int sz = sizeof(arr) / sizeof(arr[0]);
	for (i = 0; i < sz; i++)
	{
		scanf("%d", arr+i);
	}
	move_odd_even(arr, sz);
	for (i = 0; i < sz; i++)
	{
		printf(" %d ", arr[i]);
	}

	return 0;
}